package com.lin.service;

import com.lin.spring.MySpring;

/**
 * @ClassName TestMySpring
 * @Description
 * @Author lin
 * @Date 2022/4/4 下午4:21
 * @Version V1.0
 */
public class TestMySpring {
    public static void main(String[] args) {
//        MySpring mySpring = new MySpring(AppConfig.class);
//        UserService userService = (UserService) mySpring.getBean("userService");
//        System.out.println(userService);
//        System.out.println(userService.getOrderService());
//        System.out.println(userService.getMyBeanName());
//        UserService userService1 = (UserService) mySpring.getBean("userService");
//        System.out.println(userService1);
//        System.out.println(userService1.getOrderService());
        // aop
        MySpring mySpring = new MySpring(AppConfig.class);
        Object userService = mySpring.getBean("userService");
        System.out.println(userService);
    }
}
